<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Startup</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Startup' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../extensions.html">Kits</a></li><li><a href="index.html">Architecture32Kit</a></li><li><b>Startup</b></li></ul></div>
<p class="purpose">Startup  How programs for this architecture start up the virtual machine.</p>

<ul class="toc"><li><a href="strtp.html#SP2">&#167;2. Capture startup text</a></li><li><a href="strtp.html#SP3">&#167;3. Set up the Glk objects</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b><span class="extract"><span class="extract-syntax">VM_Check_Functionality</span></span> checks that we are running in a Glk interpreter,
as well as that it supports the minimum requirements, which are currently
that Glk supports unicode, and Glulx supports real numbers. If one of those
requirements is not met an error message will be shown before quitting.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">VM_Check_Functionality</span><span class="plain-syntax"> </span><span class="identifier-syntax">res</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    @</span><span class="identifier-syntax">gestalt</span><span class="plain-syntax"> </span><span class="identifier-syntax">GLULX_GESTALT_IOSystem</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span><span class="plain-syntax"> </span><span class="identifier-syntax">res</span><span class="plain-syntax">; </span><span class="comment-syntax">Test if this interpreter has Glk...</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">res</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">quit</span><span class="plain-syntax">; </span><span class="comment-syntax">...without which there would be nothing we could do</span>

<span class="plain-syntax">    </span><span class="comment-syntax">Set the VM's I/O system to be Glk.</span>
<span class="plain-syntax">    @</span><span class="identifier-syntax">setiosys</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (~~</span><span class="identifier-syntax">glk_gestalt</span><span class="plain-syntax">(</span><span class="identifier-syntax">gestalt_Unicode</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Fatal_Error</span><span class="plain-syntax">(</span><span class="string-syntax">"This storyfile can only be run in an unicode interpreter."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    @</span><span class="identifier-syntax">gestalt</span><span class="plain-syntax"> </span><span class="identifier-syntax">GLULX_GESTALT_Float</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span><span class="plain-syntax"> </span><span class="identifier-syntax">res</span><span class="plain-syntax">; </span><span class="comment-syntax">Test if this interpreter supports real numbers...</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">res</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Fatal_Error</span><span class="plain-syntax">(</span><span class="string-syntax">"This storyfile can only be run in a Glulx interpreter that supports floating-point arithmetic."</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">Fatal_Error</span><span class="plain-syntax"> </span><span class="identifier-syntax">msg</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax"> = </span><span class="identifier-syntax">glk_window_open</span><span class="plain-syntax">(0, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">wintype_TextBuffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">GG_MAINWIN_ROCK</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">glk_set_window</span><span class="plain-syntax">(</span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"Fatal Error: "</span><span class="plain-syntax">, (</span><span class="reserved-syntax">string</span><span class="plain-syntax">) </span><span class="identifier-syntax">msg</span><span class="plain-syntax">, </span><span class="string-syntax">"^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">quit</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. Capture startup text.</b>It is a semi-common problem for authors to do something which results in text
being printed before any Glk windows have been opened, which results in a fatal
interpreter error. (Or even worse, an extension is the cause, which the author
should not be expected to know the internal details of.) This is very frustrating,
as the author often will not know what is the cause of the error as any error
messages can't be shown until a Glk window is created; indeed it's often an error
message that is trying to be printed, which the author will never see. To help
authors, while we wait for the virtual machine to be set up (including a Glk
window) we can instead send any text to a memory stream. Then once the VM is ready
we can check if any text was sent to the memory stream, and then finally display
it in the window. We only capture 256 bytes, which may not be all that is attempted
to be printed, but hopefully it gives authors enough to identify the problem.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">PRE_STARTUP_TEXT_CAPTURE_MAX_LEN</span><span class="plain-syntax"> = </span><span class="constant-syntax">256</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">Pre_Startup_Text_Capture_Buffer</span><span class="plain-syntax"> -&gt; </span><span class="identifier-syntax">PRE_STARTUP_TEXT_CAPTURE_MAX_LEN</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">Pre_Startup_Text_Capture_Results</span><span class="plain-syntax"> --&gt; </span><span class="constant-syntax">2</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">Pre_Startup_Text_Capture_Stream</span><span class="plain-syntax">;</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">CAPTURE_STARTUP_TEXT_R</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Pre_Startup_Text_Capture_Stream</span><span class="plain-syntax"> = </span><span class="identifier-syntax">glk_stream_open_memory</span><span class="plain-syntax">(</span><span class="identifier-syntax">Pre_Startup_Text_Capture_Buffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">PRE_STARTUP_TEXT_CAPTURE_MAX_LEN</span><span class="plain-syntax">, </span><span class="identifier-syntax">filemode_Write</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">glk_stream_set_current</span><span class="plain-syntax">(</span><span class="identifier-syntax">Pre_Startup_Text_Capture_Stream</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">END_CAPTURE_STARTUP_TEXT_R</span><span class="plain-syntax"> </span><span class="identifier-syntax">len</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">glk_stream_close</span><span class="plain-syntax">(</span><span class="identifier-syntax">Pre_Startup_Text_Capture_Stream</span><span class="plain-syntax">, </span><span class="identifier-syntax">Pre_Startup_Text_Capture_Results</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">len</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Pre_Startup_Text_Capture_Results</span><span class="plain-syntax">--&gt;1;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">len</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">len</span><span class="plain-syntax"> &gt; </span><span class="identifier-syntax">PRE_STARTUP_TEXT_CAPTURE_MAX_LEN</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">len</span><span class="plain-syntax"> = </span><span class="identifier-syntax">PRE_STARTUP_TEXT_CAPTURE_MAX_LEN</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">glk_put_buffer</span><span class="plain-syntax">(</span><span class="identifier-syntax">Pre_Startup_Text_Capture_Buffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">len</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. Set up the Glk objects.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">SOUND_CHANNEL_INIT_R</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">glk_gestalt</span><span class="plain-syntax">(</span><span class="identifier-syntax">gestalt_Sound</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">gg_foregroundchan</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">gg_foregroundchan</span><span class="plain-syntax"> = </span><span class="identifier-syntax">glk_schannel_create</span><span class="plain-syntax">(</span><span class="identifier-syntax">GG_FOREGROUNDCHAN_ROCK</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">gg_backgroundchan</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">gg_backgroundchan</span><span class="plain-syntax"> = </span><span class="identifier-syntax">glk_schannel_create</span><span class="plain-syntax">(</span><span class="identifier-syntax">GG_BACKGROUNDCHAN_ROCK</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">SET_DEFAULT_STYLEHINTS_R</span><span class="plain-syntax"> </span><span class="identifier-syntax">sty</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="comment-syntax">Main window</span>
<span class="plain-syntax">    </span><span class="comment-syntax">Left-justify the header style</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">glk_stylehint_set</span><span class="plain-syntax">(</span><span class="identifier-syntax">wintype_TextBuffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">style_Header</span><span class="plain-syntax">, </span><span class="identifier-syntax">stylehint_Justification</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="comment-syntax">Try to make emphasized type in italics and not boldface</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">glk_stylehint_set</span><span class="plain-syntax">(</span><span class="identifier-syntax">wintype_TextBuffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">style_Emphasized</span><span class="plain-syntax">, </span><span class="identifier-syntax">stylehint_Weight</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">glk_stylehint_set</span><span class="plain-syntax">(</span><span class="identifier-syntax">wintype_TextBuffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">style_Emphasized</span><span class="plain-syntax">, </span><span class="identifier-syntax">stylehint_Oblique</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="comment-syntax">All status window styles should be reversed</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">sty</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">: </span><span class="identifier-syntax">sty</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">style_NUMSTYLES</span><span class="plain-syntax">: </span><span class="identifier-syntax">sty</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">glk_stylehint_set</span><span class="plain-syntax">(</span><span class="identifier-syntax">wintype_TextGrid</span><span class="plain-syntax">, </span><span class="identifier-syntax">sty</span><span class="plain-syntax">, </span><span class="identifier-syntax">stylehint_ReverseColor</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">OPEN_BUILT_IN_WINDOWS_R</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="comment-syntax">gg_mainwin and gg_storywin might already be set. If not, create them.</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="comment-syntax">Open the story window.</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax"> = </span><span class="identifier-syntax">glk_window_open</span><span class="plain-syntax">(0, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="identifier-syntax">wintype_TextBuffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">GG_MAINWIN_ROCK</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">Main_Window</span><span class="plain-syntax">.</span><span class="identifier-syntax">glk_ref</span><span class="plain-syntax"> = </span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="comment-syntax">If we can't even open one window, give in</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">quit</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">BasicInformKit</span><span class="plain-syntax">`</span><span class="identifier-syntax">MANUAL_INPUT_ECHOING_CFGF</span><span class="plain-syntax"> &amp;&amp; </span><span class="identifier-syntax">Cached_Glk_Gestalts</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">gestalt_LineInputEcho</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">glk_set_echo_line_event</span><span class="plain-syntax">(</span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="comment-syntax">There was already a story window. We should erase it.</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">glk_window_clear</span><span class="plain-syntax">(</span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>

<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">BasicInformKit</span><span class="plain-syntax">`</span><span class="identifier-syntax">NO_STATUS_WINDOW_CFGF</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">gg_statuswin</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">statuswin_cursize</span><span class="plain-syntax"> = </span><span class="identifier-syntax">statuswin_size</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">gg_statuswin</span><span class="plain-syntax"> =</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">glk_window_open</span><span class="plain-syntax">(</span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax">, </span><span class="identifier-syntax">winmethod_Fixed</span><span class="plain-syntax"> + </span><span class="identifier-syntax">winmethod_Above</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">statuswin_cursize</span><span class="plain-syntax">, </span><span class="identifier-syntax">wintype_TextGrid</span><span class="plain-syntax">, </span><span class="identifier-syntax">GG_STATUSWIN_ROCK</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">gg_statuswin</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">glk_window_close</span><span class="plain-syntax">(</span><span class="identifier-syntax">gg_statuswin</span><span class="plain-syntax">, </span><span class="identifier-syntax">GLK_NULL</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">gg_statuswin</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">Status_Window</span><span class="plain-syntax">.</span><span class="identifier-syntax">glk_ref</span><span class="plain-syntax"> = </span><span class="identifier-syntax">gg_statuswin</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="comment-syntax">It's possible that the status window is not open, in which case</span>
<span class="plain-syntax">    </span><span class="comment-syntax">gg_statuswin is now zero. We must allow for that later on.</span>

<span class="plain-syntax">    </span><span class="identifier-syntax">glk_set_window</span><span class="plain-syntax">(</span><span class="identifier-syntax">gg_mainwin</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="glk.html">&#10094;</a></li><li class="progresssection"><a href="cpblt.html">cpblt</a></li><li class="progresssection"><a href="infgl.html">infgl</a></li><li class="progresssection"><a href="glk.html">glk</a></li><li class="progresscurrent">strtp</li><li class="progresssection"><a href="stt.html">stt</a></li><li class="progresssection"><a href="mthmt.html">mthmt</a></li><li class="progresssection"><a href="chrst.html">chrst</a></li><li class="progresssection"><a href="inot.html">inot</a></li><li class="progresssection"><a href="fio.html">fio</a></li><li class="progresssection"><a href="vnr.html">vnr</a></li><li class="progresssection"><a href="vrnm.html">vrnm</a></li><li class="progressnext"><a href="stt.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

